1. Field of the Invention
The present invention relates to a video image data decoding apparatus (hereinafter briefly called "picture data decoder") suitable for use for example in reproducing picture data compressed and recorded in a recording medium such as a disk.
2. Description of the Related Art
Conventionally, when picture data were compressed, pictures were classed in three types: I picture, P picture, and B picture. The I picture (intra coded picture) is such that, when it is coded, it uses a set of closed data within one area (one frame) of the picture. Although the quantity of data increases when the I pictures are used, random access or high-speed reproduction can be achieved by scattering the I pictures in the picture data. The P picture (forward prediction coded picture) is such that it uses an I picture or a P picture which has already been decoded and temporally located forward as the prediction picture (the picture serving as a reference in obtaining a differentiaL). The B picture (bidirectional prediction coded picture) is such that it uses, as the prediction picture, three types of pictures: an I picture or a P picture which has already been decoded and temporally located forward, an I picture or a P picture which has already been decoded and temporally located backward, and an interpolated picture produced from both of them.
In the case shown in FIG. 6, for example, the pictures denoted by numerals 0 to 9 are compressed as I0, B1, B2, P3, B4, B5, P6, B7, B8, and P9. Here, character I denotes the I picture, character P denotes the P picture, and character B denotes the B picture, respectively. That is, the picture No. 0 is an I picture, the picture Nos. 3, 6, and 9 are P pictures, and the picture Nos. 1, 2, 4, 5, 7, and 8 are B pictures. For example, it is arranged such that the picture I0 is generated from the data of itself, the picture P3 is generated from the temporally forward picture I0, and the picture B1 is generated from both the temporally forward picture I0 and the temporally backward picture P3.
FIG. 5 is a block diagram showing an example of structure of a conventional picture data decoder for decoding such compressed picture data as described above. An inverse VLC circuit 1 gives an inverse VLC (inverse Variable Length Coding) treatment to picture data supplied from a picture data encoder, not shown, and outputs the data to an inverse quantization circuit 2. The inverse quantization circuit 2 performs inverse zigzag scanning on the data that has undergone the inverse VLC treatment, gives an inverse quantization treatment thereto, and outputs the treated data to an inverse DCT circuit 3. The inverse DCT circuit 3 gives an inverse DCT (inverse Discrete Cosine Transform) treatment to the input data and outputs the data to an adder circuit 4. In the adder circuit 4, there is present prediction picture data which has been selected by a switch 15 and input thereto through a gate 17, and this prediction picture data and the output data from the inverse DCT circuit 3 are added up and thereby decoded picture data is generated.
When the output from the adder circuit 4 is an I picture or a P picture, a gate 5 is opened and the output is supplied, through a switch 6, to a buffer memory 7 or a buffer memory 8 to be stored therein. The inverse VLC circuit 1 is supplied with such data as motion vector data, quantization width data, and coding mode data, in addition to the picture data. The inverse VLC circuit 1 controls a timing circuit 16 in accordance with such data. The timing circuit 16 generates various timing signals in accordance with outputs from the inverse VLC circuit 1 to thereby operate the gate 5 and the gate 17 and turn switches 6, 9, 10, and 15 to the sides of predetermined contacts. When the output from the adder circuit 4 is an I picture or a P picture, the switches 9 and 10 are turned to the side of the contact a. The switch 6 is adapted to be alternately turned to the sides of the contacts a and b so that the pictures output from the adder circuit 4 (I pictures or P pictures) are alternately stored into the pair of buffer memories 7 and 8.
For example, as shown in FIG. 6, the picture data in which pictures are arranged in the sequence of I0, B1, B2, P3, B4, B5, P6, B7, B8, P9 are processed in the encoder in the sequence of I0, P3, B1, B2, P6, B4, B5, P9, B7, B8. Accordingly, the data are input to the inverse VLC circuit 1 on the decoder side in the same sequence. As a result, if, for example, decoded data of the picture I0 is stored into the buffer memory 7, then decoded data of the picture P3 is stored into the buffer memory 8. Thereafter, the data of the piture I0 in the buffer memory 7 is updated to data of the picture P6 and the data of the picture P3 in the buffer memory 8 is updated to data of the picture P9.
When the data of the picture B1 or B2 is input from the inverse DCT circuit 3 to the adder circuit 4 in succession to the data of the picture I0 and picture P3, the data of the picture I0 stored in the buffer memory 7 is motion compensated in accordance with a motion vector in a motion compensation circuit 12 to be supplied to an interpolation circuit 14. At the same time, the data of P3 stored in the buffer memory 8 is motion compensated in accordance with a motion vector in a motion compensation circuit 13 to be supplied to the interpolation circuit 14. The interpolation circuit 14 combines the inputs from the motion compensation circuits 12 and 13 in the ratio according to data input from the inverse VLC circuit 1. The combined data is selected by the switch 15 and supplied to the adder circuit 4 through the contact b of the switch 15 and the gate 17. The adder circuit 4 adds up the data from the inverse DCT circuit 3 and the data selected by the switch 15 to thereby decode the picture B1 or B2.
When the picture B1 or B2 is decoded only from the forward picture I0, the switch 15 is turned to the side of the contact a, and when it is decoded only from the backward picture P3, the switch 15 is turned to the side of the contact c, whereby the data of the picture I0 and the picture P3 are respectively supplied to the adder circuit 4.
The switch 9 is adapted to be turned to the side opposite to the side of the switch 6. More specifically, when the switch 6 is turned to the side of the contact a (the contact b), the switch 9 is turned to the side of the contact b (the contact a). Therefore, when the switch 6 is turned to the side of the contact b and the picture P3 is stored into the buffer memory 8 after the picture I0 has been stored in the buffer memory 7, the switch 9 is turned to the side of the contact a. Since, at this time, the switch 10 is turned to the side of the contact a, the picture I0 is read from the buffer memory 7 and supplied, through the switches 9 and 10, to a display 11 to be displayed thereon. Since the switch 10 is turned to the side of the contact b when the picture B1 or B2 is output from the adder circuit 4, the picture B1 or B2 is supplied to the display 11. Then, the switch 9 is turned to the side of the contact b and the switch 10 is turned to the side of the contact a, whereby the picture P3 already stored in the buffer memory 8 is read out to be supplied to the display 11.
Thereafter, the same operations are repeated and all the pictures are sequentially output and displayed.
In the conventional apparatus, as described above, it is adapted, when data of a P picture is decoded, such that picture data stored in the other buffer memory of the pair of the buffer memories is read out. As a result, in the case where for example the pictures arranged in the sequence of pictures I0, B1, B2, P3, B4, B5, P6, B7, B8, and P9 are those of a person walking along a street with buildings for a background as shown in FIG. 7, if it is attempted to generate the picture of the area indicated by the window W1 in the picture P6 (the picture of buildings in the background) from the forward picture P3, then, because the person in the picture P3 is located in the position corresponding to the window W1 in the picture P6, the picture of the window W1 (the picture of the buildings in the background) cannot be obtained therefrom.
Similarly, when it is attempted to generate the picture in the area indicated by the window W2 (the picture of buildings in the background) in the picture P9 from the forward picture P6, then, because the person in the picture P6 is located in the position corresponding to the window W2 in the picture P9, the picture of the window W2 (the picture of the buildings in the background) cannot be obtained therefrom. Thus, the conventional apparatus has been unable to reproduce an accurate picture.
In other words, since it was arranged in the conventional apparatus to perform the forward prediction by utilizing the data stored in the other of one pair of buffer memories, there was a problem that it was difficult for the conventional apparatus to accurately reproduce the original picture.